package common;

public class Entity {
	private int id;
	private String ip;
	public Entity(int id, String ip) {
		this.id = id;
		this.ip = ip;
	}
	/**
	 * @return the id
	 */
	public int getId() {
		return id;
	}

	/**
	 * @return the ip
	 */
	public String getIp() {
		return ip;
	}
	
	@Override
	public boolean equals(Object o) {
		if(o.getClass().equals(Entity.class)) {
			return id == ((Entity) o).id;
		} else {
			return false;
		}
	}
	
	@Override
	public int hashCode() {
		return id;
	}
	
	public String toString(){
		return id+" "+ip;
	}
}
